package design_pattern.strategy.pay;

import design_pattern.strategy.pay.impl.AlipayStrategy;
import design_pattern.strategy.pay.impl.WechatStrategy;

public class Client {
    public static void main(String[] args) {
        PaymentStrategy alipay = new AlipayStrategy();
        PaymentStrategy wechat = new WechatStrategy();

        int amount = 100;
        PaymentContext context = new PaymentContext(alipay);
        context.executePayment(amount);

        context = new PaymentContext(wechat);
        context.executePayment(amount);
    }
}
